﻿<form id="frmBXJGWorkOrderWorkOrderStatusChangeDescription" class="frm-container">
    <table class="frm-box">
        <tr>
            <th class="top">情况说明</th>
            <td colspan="3" style=" padding:7px 0;">
                <input name="description" class="easyui-textbox" data-options="width:400,multiline:true, height:370, validType:'length[0,500]',prompt:''" />
            </td>
        </tr>
    </table>
</form>
<script>

    (function () {
        const m = 'BXJGWorkOrderWorkOrder';
        const $dlg = $('#dlg' + m + 'StatusChangeDescription');
        const $frm = $dlg.find('form');
        const ids = $dlg.data('ids');
        const status = $dlg.data('status');
       

        $dlg.data('clickSave', function () {
            //验证录入
            if (!$frm.form('validate'))
                return;

            //处理简单的表单数据
            var postData = $frm.serializeJSON();
            postData.ids = ids;
            postData.status = status;
          
            let defer = abp.services.bxjgworkorder.workOrder.changeStatus(postData).done(function (d) {
                abp.notify.success(abp.localization.bxjgWorkOrder('分配') + abp.localization.bxjgUtils('成功') + '!');
                onSaved('onUpdated');
            });
            abp.ui.setBusy($dlg, defer);
        });

        function onSaved(funcName) {
            var f = $dlg.data(funcName);
            if (f)
                f();
        }

    })();
</script>
